package com.ziguang.redwood.admin.validator;

import com.jfinal.core.Controller;
import com.jfinal.validate.Validator;

public class ProductTypeValidator extends Validator{

	@Override
	protected void validate(Controller c) {
		validateRequiredString("type_name", "typeNameMsg", "分类名称为空");
		validateRequiredString("sort", "sortMsg", "排序为空");
	}

	@Override
	protected void handleError(Controller c) {
		c.renderJson("{\"code\":1}");
	}
	
}
